<?php
/**
 * Created by PhpStorm.
 * DateTime: 2020/11/2 9:52
 * Intro:
 */

namespace addons\podunk\validate;

use think\Validate;

class Base extends Validate
{
    /**
     * 判断一个数是否为正整数
     */
    protected function isPositiveInteger($value, $rule = '', $data = '', $field = '')
    {

        if (is_numeric($value) && is_int($value + 0) && ($value + 0) > 0) {
            return true;
        } else {
            return false;
        }
    }
}